import request from '@/utils/request.js'

//应用模块菜单
export function menu(data) {
	return request({
		url: `admin/menu`,
		method: 'GET',
		params: data
	})
}

// 获取项目基础信息
export function projectInfo(projectId) {
  return request({
    url: `business/project/info/`+projectId,
    method: 'GET',
  })
}

// 水印模板
export function waterManagement(id) {
  return request({
    url: `business/zdhjcWatermarkManagement/get/${id}`,
    method: 'GET',
  })
}

// 获取项目基础信息对应的单位名称
export function entityType() {
  return request({
    url: `admin/dict/type/entity_type`,
    method: 'GET',
  })
}

// 获取子项目列表
export function subproject(data) {
  return request({
    url: `business/project/subproject/page`,
    method: 'GET',
		params:data
  })
}

// 获取投资管理列表
export function getInvestments(data) {
  return request({
    url: `business/project/investment/page`,
    method: 'GET',
		params: data
  })
}

// 获取投资管理列表
export function getInvestmentsStatistics(data) {
  return request({
    url: `business/project/investment/statistics`,
    method: 'GET',
		params: data
  })
}

// 获取投资信息详情
export function getInvestmentsInfo(id) {
  return request({
    url: `business/project/investment/info/${id}`,
    method: 'GET'
  })
}


//查询具体工序
export function findProcess(data) {
  return request({
    url: `business/report/app/findProcess/${data.projectId}/${data.subProjectId}`,
    method: 'GET',
  })
}
//查询具体工序设备
export function equipments(data) {
  return request({
    url: `business/report/app/equipments/${data}`,
    method: 'GET',
  })
}

//提交审批
export function auditSubmit(data) {
	return request({
		url: `business/report/app/auditProcess`,
		method: 'POST',
		params: data
	})
}

//工序进度查询
export function progress(detailedProId) {
  return request({
    url: `business/report/app/progress/${detailedProId}`,
    method: 'GET',
  })
}


//获取文件信息
export function getFileInfo(id) {
	return request({
		url: `admin/sys-file/getFileById` + '?id=' + id,
		method: 'get',
		options: {
			responseType: 'arraybuffer',
		}
	})
}
//获取文件信息
export function getFileInfoAll(id) {
	return request({
		url: `admin/sys-file/getFileInfoById` + '?id=' + id,
		method: 'get',
	})
}
//查询具体工序设备详情
export function equipmentDetail(data) {
  return request({
    url: `business/report/app/equipmentDetail/${data.standardProId}/${data.standardId}`,
    method: 'GET',
  })
}

//通过字典类型查找字典
export function equipmentTypeAll(equipmentType) {
	return request({
		url: `admin/dict/type/`+equipmentType,
		method: 'get',
	})
}

export function getFileList(data) {
  return request({
    url: 'business/project/datamanagement/page',
    method: 'get',
    params:data
  });
}

export function queryListByFieldType(type) {
  return request({
    url: `admin/dict/type/${type}`,
    method: 'GET',
  });
}

export function datamanagementInfo(dataId) {
  return request({
    url: `business/project/datamanagement/info/${dataId}`,
    method: 'GET',
  });
}

export function zdhjcsubassessment(data) {
  return request({
    url: `business/zdhjcassessment/page`,
    method: 'GET',
		params:data
  })
}

//根据id查询维护任务详情
export function findSubProjects(maintainTaskId) {
  return request({
    url: `business/zdhjcmaintaintask/gaugingPoint/detail/`+maintainTaskId ,
    method: 'GET',
  })
}

// 分页获取维护详情
export function getMaintainInfo(projectId) {
  return request({
    url: `supervision/maintainkanban/project/`+ projectId,
    method: 'GET'
  })
}